package com.shj.em.aa.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.shj.em.aa.dto.RoleSearchDTO;
import com.shj.em.aa.dto.UserSearchDTO;
import com.shj.em.aa.entity.Role;
import com.shj.em.aa.entity.User;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Shen Huang Jian
 * @since 2018-06-25
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User findByUserId(String userId);

    List<User> getUsersByRoleId(Long roleId);

    List<User> getUsersUnassignedRoleId(Long roleId);

    List<User> queryUserPage(Page<User> page, UserSearchDTO searchDTO);

}
